<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:p="http://primefaces.prime.com.tr/ui">

 	
	<ui:composition template="/templates/user/content.xhtml">
	
		<ui:define name="pageTitle">Property Details</ui:define>
		<ui:define name="body">
	<div class="container_24">
		
		<div class="wrapper">
			<ui:include src="/templates/user/sidebar_for_user.xhtml" />
			<div class="grid_17">
				<div class="inside">
				<h:panelGroup rendered="#{mRequestProperty.hasProperty eq true}">
					
					<article>
					<h3>Common Details:</h3>
					<table class="prop_details_table" border="1">
						<thead>
						<tr>
							<th colspan="6">#{mRequestProperty.prop.title}</th>
						</tr>
						</thead>
						<tbody>
							<tr>
								<td class="item_header">Posted By:</td>
								<td class="item_content"><h:link style="text-decoration:none;" outcome="user_profile?uid=#{mRequestProperty.acc.accID}">#{mRequestProperty.acc.name}</h:link> <span style="color:#{mRequestProperty.acc.isVerified eq true ? 'green' : 'red'} ">(#{mRequestProperty.acc.isVerified eq true ? 'Verified' : 'Not Verified'})</span></td>
								<td class="item_header">Type:</td>
								<td class="item_content">#{mRequestProperty.realPropType}</td>
								<td class="item_header">Posted Date:</td>
								<td class="item_content">#{mRequestProperty.prop.postDate}</td>
							</tr>
							<tr>
								<td class="item_header">State:</td>
								<td class="item_content">#{mRequestProperty.prop.state}</td>
								<td class="item_header">Address:</td>
								<td class="item_content">#{mRequestProperty.prop.address}</td>
								<td class="item_header">Available:</td>
								<td class="item_content" style="font-weight: bold; #{mRequestProperty.prop.status eq true ? 'color:green;' : 'color:red'}">#{mRequestProperty.prop.status eq true ? 'Yes' : 'Not Available'}</td>
							</tr>
							<tr>
								<td class="item_header" colspan="6" width="100%">Note:</td>
							</tr>
							<tr>
								<td class="item_content" colspan="6">#{mRequestProperty.prop.description}</td>
							</tr>
						</tbody>
					</table>
					</article>
					<article>
					<h3>Property Information Details:</h3>
					<h:panelGroup rendered="#{mRequestProperty.propType == 'pfr'}">
					<table class="prop_details_table" border="1">
						<tbody>
							<tr>
								<td class="item_header">Property ID:</td>
								<td class="item_content">#{mRequestProperty.pfr.propID}</td>
								<td class="item_header">Size:</td>
								<td class="item_content">Bathrooms: #{mRequestProperty.pfr.bathRoom}, Bedrooms: #{mRequestProperty.pfr.bedRoom}</td>
								<td class="item_header">Deposit</td>
								<td class="item_content">#{mRequestProperty.pfr.deposit} $</td>
							</tr>
							<tr>
								<td class="item_header">Rent:</td>
								<td class="item_content">#{mRequestProperty.pfr.rent} $</td>
								<td class="item_header" colspan='2'>Payment Method:</td>
								<td class="item_content" colspan='2'>#{mRequestProperty.pfr.payment}</td>
							</tr>
							
						</tbody>
					</table>
					</h:panelGroup>
					
					<h:panelGroup rendered="#{mRequestProperty.propType == 'pfs'}">
						<table class="prop_details_table" border="1">
							<tbody>
								<tr>
									<td class="item_header">Property ID:</td>
									<td class="item_content">#{mRequestProperty.pfs.propID}</td>
									<td class="item_header">Size:</td>
									<td class="item_content">Bathrooms: #{mRequestProperty.pfs.bathroom}, Bedrooms: #{mRequestProperty.pfs.bedroom}, #{mRequestProperty.pfs.square} m<sup>2</sup></td>
									<td class="item_header">Facility: </td>
									<td class="item_content">#{mRequestProperty.pfs.facility}</td>
								</tr>
								<tr>
									<td class="item_header">Transport:</td>
									<td class="item_content">#{mRequestProperty.pfs.transport}</td>
									<td class="item_header">Interior:</td>
									<td class="item_content">#{mRequestProperty.pfs.hasInterior eq true ? 'Yes' : 'No'}</td>
									<td class="item_header">Price: </td>
									<td class="item_content">#{mRequestProperty.pfs.price} $</td>
								</tr>
								<tr>
									<td class="item_header">Type:</td>
									<td class="item_content">#{mRequestProperty.pfs.type}</td>
									<td class="item_header">Payment Method:</td>
									<td class="item_content" colspan="3">#{mRequestProperty.pfs.payment}</td>
								</tr>
							
							</tbody>
						</table>
					</h:panelGroup>
					
					<h:panelGroup rendered="#{mRequestProperty.propType == 'rfr'}">
						<table class="prop_details_table" border="1">
							<tbody>
								<tr>
									<td class="item_header">Property ID:</td>
									<td class="item_content">#{mRequestProperty.rfr.propID}</td>
									<td class="item_header">Deposit:</td>
									<td class="item_content">#{mRequestProperty.rfr.deposit}</td>
									<td class="item_header">Rent: </td>
									<td class="item_content">#{mRequestProperty.rfr.rent}</td>
								</tr>
							</tbody>
						</table>
					</h:panelGroup>
					</article>
					
					<article>
					
					<h3>Property Images</h3>
					<table class="prop_imgs" border="1">
						<tbody>
							<tr>
								<td class="item_img_large" rowspan="3" width="370">
									<h:graphicImage value="#{mRequestProperty.requested_images['0']}" width='370' height='275' />
								</td>
								<td height='80'>
									<h:graphicImage value="#{mRequestProperty.requested_images['0']}" width='110' height='80' />
								</td>
								<td height='80'>
									<h:graphicImage value="#{mRequestProperty.requested_images['1']}" width='110' height='80' />
								</td>
							</tr>
							<tr>
								<td height='80'>
									<h:graphicImage value="#{mRequestProperty.requested_images['2']}" width='110' height='80' />
								</td>
								<td height='80'>
									<h:graphicImage value="#{mRequestProperty.requested_images['3']}" width='110' height='80' />
								</td>
							</tr>
							<tr>
								<td height='80'>
									<h:graphicImage value="#{mRequestProperty.requested_images['4']}" width='110' height='80' />
								</td>
								<td height='80'>
									<h:graphicImage value="#{mRequestProperty.requested_images['5']}" width='110' height='80' />
								</td>
							</tr>
						</tbody>
					</table>
					
					</article>
					
					</h:panelGroup>
					<a4j:jsFunction name="hitCounter" action="#{mRequestProperty.visit_log}" id="ajax_add_hit">
          				<a4j:param name="propIDParam" assignTo="#{mRequestProperty.PIDParam}"></a4j:param>		
    				</a4j:jsFunction>
    				<script type="text/javascript">
    				jQuery(document).ready(function() {
    					hitCounter('#{param.pid}');
        			});
						
 					</script>
				</div>
			</div>
		</div>
	</div>
</ui:define>
</ui:composition>


</html>
